<?php
namespace App\Modules\Health\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;

class Body extends Model
{
    use HasDateTimeFormatter;

    protected $table = 'health_body';

    protected $primaryKey = 'id';

    protected $fillable = [
        'name', // 名称
        'img', // 图片路径
        'status', // 状态 1-正常 0-禁用
    ];

    public function acu()
    {
        return $this->hasManyThrough(Acupoint::class, AcuBody::class, 'body_id', 'id', 'id', 'acu_id');
    }
}
